#include "TableInterface/table.h"
#include "TableInterface/param_table_interface.h"
#include "function_interface.h"
#include "fpga_interface.h"
#include "comm_monitor.h"
#include "electricity_quantity_statistics.h"
#include "global_variable.h"
#include "Product.h"
#include "iso_interface.h"
#include <time.h>
#include "debug.h"
#include "ratio_coef.h"
#include "ieee_1547.h"


int HmiTable_InitCallback(tableEntry_t *pEntry)
{
    int retVal = 0;
    uint32_t addr = pEntry->idx;
    uint16_t *pValue = &pEntry->data;
    float fltVal = 0.0F;

    /* 以太网 */   
    if(addr >= 320 && addr <= 329) 
    {
        switch(addr)
        {
            case 321:
            {
                *pValue = 321;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP0, pValue);
                #endif
                break;
            }
            case 322:
            {
                *pValue = 322;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP1, pValue);
                #endif
                break;
            }
            case 323:
            {
                *pValue = 323;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP2, pValue);
                #endif
                break;
            }
            case 324:
            {
                *pValue = 324;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP3, pValue);
                #endif
                break;
            }
            case 325:
            {
                *pValue = 0;
                #if 0
                BRConfig_Get("netmask",localIp,4);
                *pValue=localIp[0];
                #endif
                break;
            }
            case 326:
            {
                *pValue = 0;
                #if 0
                BRConfig_Get("netmask",localIp,4);
                *pValue=localIp[1];
                #endif
                break;
            }
            case 327:
            {
                *pValue = 0;
                #if 0
                BRConfig_Get("netmask",localIp,4);
                *pValue=localIp[2];
                #endif
                break;
            }
            case 328:
            {
                *pValue = 0;
                #if 0
                BRConfig_Get("netmask",localIp,4);
                *pValue=localIp[3];
                #endif
                break;
            }    
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 485 */
    else if(addr >= 330 && addr <= 339) 
    {
        switch(addr)
        {
            case 331:
            {
                *pValue = 331;
                #if 1
                FuncInf_GetHmiSlaveId(NULL, pValue);
                #endif
                break;
            }

            case 332:
            {
                *pValue = 332;
                #if 1
                *pValue = 9600;
                #endif
                break;
            }

            case 333:
            {
                *pValue = 333;
                #if 1
                *pValue = 8;
                #endif
                break;
            }
                
            case 334:
            {
                *pValue = 334;
                #if 1
                *pValue = 1;
                #endif
                break;
            }
                
            case 335:
            {
                *pValue = 335;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }       
        }
    }

    /* CAN */
    else if(addr >= 340 && addr <= 349) 
    {
        switch(addr)
        {
            default:
                *pValue = 0;
                break;
        }
    }

    /* 以太网-基本网口 */
    else if(addr >= 350 && addr <= 359) 
    {
        switch(addr)
        {
            case 350:
            {
                *pValue = 350;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP0, pValue);
                #endif
                break;
            }

            case 351:
            {
                *pValue = 351;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP1, pValue);
                #endif
                break;
            }

            case 352:
            {
                *pValue = 352;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP2, pValue);
                #endif
                break;
            }

            case 353:
            {
                *pValue = 353;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_IP3, pValue);
                #endif
                break;
            }

            case 354:
            {
                *pValue = 354;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC0, pValue);
                #endif
                break;
            }

            case 355:
            {
                *pValue = 355;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC1, pValue);
                #endif
                break;
            }

            case 356:
            {
                *pValue = 356;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC2, pValue);
                #endif
                break;
            }

            case 357:
            {
                *pValue = 357;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC3, pValue);
                #endif
                break;
            }

            case 358:
            {
                *pValue = 358;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC4, pValue);
                #endif
                break;
            }

            case 359:
            {
                *pValue = 359;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT1_MAC5, pValue);
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 以太网-扩展网口0 */
    else if(addr >= 360 && addr <= 369) 
    {
        switch(addr)
        {
            case 360:
            {
                *pValue = 360;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_IP0, pValue);
                #endif
                break;
            }

            case 361:
            {
                *pValue = 361;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_IP1, pValue);
                #endif
                break;
            }

            case 362:
            {
                *pValue = 362;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_IP2, pValue);
                #endif
                break;
            }

            case 363:
            {
                *pValue = 363;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_IP3, pValue);
                #endif
                break;
            }

            case 364:
            {
                *pValue = 364;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC0, pValue);
                #endif
                break;
            }

            case 365:
            {
                *pValue = 365;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC1, pValue);
                #endif
                break;
            }

            case 366:
            {
                *pValue = 366;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC2, pValue);
                #endif
                break;
            }

            case 367:
            {
                *pValue = 367;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC3, pValue);
                #endif
                break;
            }

            case 368:
            {
                *pValue = 368;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC4, pValue);
                #endif
                break;
            }

            case 369:
            {
                *pValue = 369;
                #if 1
                FuncInf_GetNetParam(FUNCINF_NET_PARAM_TYPE_PORT2_MAC5, pValue);
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 电池充电、放电电压限制 */
    else if(addr >= 810 && addr <= 819) 
    {
        switch(addr)
        {
            case 810:
            {
                *pValue = 810;
                #if 1
                FuncInf_GetExtremeValue(FUNCINF_EXTR_VAL_TYPE_DC_U_MAX, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }

            case 811:
            {
                *pValue = 811;
                #if 1
                FuncInf_GetExtremeValue(FUNCINF_EXTR_VAL_TYPE_DC_U_MIN, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }

            default:
                *pValue = 0;
                break;
        }
    }

    /* 尖峰平谷 */
    else if(addr >= 1200 && addr <= 1299) 
    {
        switch(addr)
        {
            case 1200:
            {
                *pValue = 1200;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_1, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1201:
            {
                *pValue = 1201;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_1, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1202:
            {
                *pValue = 1202;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1203:
            {
                *pValue = 1203;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1205:
            {
                *pValue = 1205;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_2, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1206:
            {
                *pValue = 1206;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_2, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1207:
            {
                *pValue = 1207;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_2, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1208:
            {
                *pValue = 1208;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1210:
            {
                *pValue = 1210;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_3, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1211:
            {
                *pValue = 1211;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_3, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1212:
            {
                *pValue = 1212;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_3, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1213:
            {
                *pValue = 1213;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1215:
            {
                *pValue = 1215;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_4, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1216:
            {
                *pValue = 1216;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_4, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1217:
            {
                *pValue = 1217;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_4, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1218:
            {
                *pValue = 1218;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1220:
            {
                *pValue = 1220;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_5, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1221:
            {
                *pValue = 1221;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_5, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1222:
            {
                *pValue = 1222;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_5, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1223:
            {
                *pValue = 1223;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1225:
            {
                *pValue = 1225;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_6, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1226:
            {
                *pValue = 1226;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_6, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1227:
            {
                *pValue = 1227;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_6, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1228:
            {
                *pValue = 1228;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1230:
            {
                *pValue = 1230;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_7, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1231:
            {
                *pValue = 1231;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_7, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1232:
            {
                *pValue = 1232;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_7, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1233:
            {
                *pValue = 1233;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1235:
            {
                *pValue = 1235;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_8, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1236:
            {
                *pValue = 1236;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_8, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1237:
            {
                *pValue = 1237;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_8, &fltVal);
                *pValue = (int16_t)fltVal * 10;
                #endif
                break;
            }
            
            case 1238:
            {
                *pValue = 1238;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
                    
            case 1299:
            {
                *pValue = 1299;
                #if 1
                FuncInf_GetStrategySwitch(FUNCINF_STRTG_SWITCH_TYPE_TIME_PERIOD, pValue);
                #endif
                break;
            }
            
            case 1300:
            {
                #if 1
                FuncInf_GetPowerFactor(NULL, &fltVal);
                *pValue = (uint16_t)fltVal * 100;
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 描述和版本 */
    else if(addr >= 3000 && addr <= 3019) 
    {
        switch(addr)
        {
            case 3010:
            {
                *pValue = 3010;
                #if 1  
                FuncInf_GetVersion(FUNCINF_VER_TYPE_ALL, pValue);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    return retVal;
}


int HmiTable_RefreshCallback(tableEntry_t *pEntry)
{
    int retVal = 0;
    uint32_t addr = pEntry->idx;
    uint16_t *pValue = &pEntry->data;
    uint32_t addrTmp = 0;
    uint32_t tempU32 = 0;
    uint16_t fpgaValue = 0;
    uint16_t tempU16 = 0;
    uint16_t temp1U16 = 0;
    uint16_t idxDev = 0;
    uint16_t comSwitch = 0;
    float elecQutt = 0, fltVal = 0.0F;
    u16BitType_t b16Data;
    fpagDataFsm_t fsm = 0;
    funcInfCtrlMode_t ctrlmode = 0;
    funcInfRunMode_t runmode = 0;
    isoBoardInfor_t ibdinfor;
    isChrgOrDisc_t isChrgOrDisc = 0;
    branchType_t branchtype = 0;
    queryDataType_t dataType = 0;
    commState_t state;
    modeSwitch_t mode1547switch;
    struct elecQuttDataDB* peqdata;
    struct elecQuttDataDB eqdata;

    /* FPGA参数 */
    if (addr <= 220)
    {
        #if 1
        FuncInf_DirectReadFpga(addr, &fpgaValue);
        RatioCoef_GetRealValue(addr, fpgaValue, &fltVal);
        *pValue = (int16_t)fltVal;
        #endif
        // printf("FPGA参数\n");
    }

    /* 时间 */
    else if (addr >= 300 && addr <= 309)
    {
        switch(addr)
        {
            case 300: //写入权（没用）
            {
                *pValue = 0;
                break;
            }

            case 301: //年
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_YEAR, pValue);
                break;
            }

            case 302: //月
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_MON, pValue);
                break;
            }

            case 303: //日
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_DATE, pValue);
                break;
            }
            
            case 306: //时
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_HOUR, pValue);
                break;
            }

            case 307: //分
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_MIN, pValue);
                break;
            }

            case 308: //秒
            {
                FuncInf_GetTime(FUNCINF_TIME_TYPE_SEC, pValue);
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 开关机 */
    else if(addr >= 310 && addr <= 319)
    {
        switch(addr)
        {			
            case 310:
            {
                *pValue = 310;
                #if 1
                FuncInf_GetCtrlMode(NULL, &ctrlmode);
                if(ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
                {
                    *pValue = 4;
                }
                else if(ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
                {
                    *pValue = 1;
                }
                #endif
                break;
            }
                
            case 311:
            {
                #if 1
                FuncInf_GetRunMode(NULL, &runmode);
                if(runmode == FUNCINF_RUN_MODE_VF)
                {
                    *pValue = 1;
                }
                else if(runmode == FUNCINF_RUN_MODE_PQ)
                {
                    *pValue = 2;
                }
                else if(runmode == FUNCINF_RUN_MODE_VSG)
                {
                    *pValue = 64;
                }
                else
                {
                    *pValue = 0;
                }
                #endif
                break;
            }

            case 312: /* 1-显示关机     */
            {
                #if 1
                FuncInf_GetFsm(FUNCINF_FSM_TYPE_THIS_TIME, &fsm);
                *pValue = (fsm == FUNCINF_FSM_IDLE ? 0 : 1);
                // printf("[%s]: fsm[%d] *pValue[%d]\n", __func__, fsm, *pValue);
                #endif
                break;
            }

            case 317: //策略
            {
                *pValue = 317;
                #if 1
                FuncInf_GetStrategySwitch(FUNCINF_STRTG_SWITCH_TYPE_ALL, pValue);
                #endif
                break;
            }    
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* AC */
    else if(addr >= 399 && addr <= 419) 
    {
        switch(addr)
        {
            case 399:
            {
                *pValue = 399;
                #if 1
                addrTmp = 54;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 400:
            {
                *pValue = 400;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_AC_OV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 401:
            {
                *pValue = 401;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_AC_OV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 402:
            {
                *pValue = 402;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_OV_THR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 403:
            {
                *pValue = 403;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_AC_OV_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 404:
            {
                *pValue = 404;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_AC_UV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 405:
            {
                *pValue = 405;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_AC_UV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 406:
            {
                *pValue = 406;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_UV_THR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 408:
            {
                *pValue = 408;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_AC_OC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 409:
            {
                *pValue = 408;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_AC_OC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 410:
            {
                *pValue = 408;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_AC_OC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 411:
            {
                *pValue = 411;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_AC_OC_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 412:
            {
                *pValue = 412;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_CUR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 413:
            {
                *pValue = 413;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_CUR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 414:
            {
                *pValue = 414;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_PWR_DISC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 415:
            {
                *pValue = 415;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_PWR_CHRG, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 416:
            {
                *pValue = 416;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_AC_VOL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 417:
            {
                *pValue = 417;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_ACT_PWR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 418:
            {
                *pValue = 418;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_REACT_PWR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 419:
            {
                *pValue = 419;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_DC_VOL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* BUS */
    else if(addr >= 420 && addr <= 439) 
    {
        switch(addr)
        {
            case 420:
            {
                *pValue = 420;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_DC_OV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 423:
            {
                *pValue = 423;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_DC_OV_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 424:
            {
                *pValue = 424;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_DC_UV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 428:
            {
                *pValue = 428;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_DC_OC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 431:
            {
                *pValue = 431;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_DC_OC_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 432:
            {
                *pValue = 432;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_CUR_DISC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 433:
            {
                *pValue = 433;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_CUR_CHRG, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 434:
            {
                *pValue = 434;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_PWR_DISC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 435:
            {
                *pValue = 435;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_PWR_CHRG, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            case 436:
            {
                *pValue = 436;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_DC_VOL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* DC1 */
    else if(addr >= 440 && addr <= 459) 
    {
        switch(addr)
        {
            case 440:
            {
                *pValue = 440;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_BAT_OV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 443:
            {
                *pValue = 443;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_BAT_OV_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 444:
            {
                *pValue = 444;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_BAT_UV, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 448:
            {
                *pValue = 448;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_BAT_OC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 451:
            {
                *pValue = 451;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_BAT_OC_INST, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 452:
            {
                *pValue = 452;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_CUR_DISC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 453:
            {
                *pValue = 453;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_CUR_CHRG, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 454:
            {
                *pValue = 454;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_PWR_DISC, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 455:
            {
                *pValue = 455;
                #if 1
                FuncInf_GetLimit(FUNCINF_LMT_TYPE_DC_PWR_CHRG, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 456:
            {
                *pValue = 456;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_DC_VOL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 459:
            {
                *pValue = 459;
                #if 1
                FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_DC_VOL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* DC2 */
    else if(addr >= 460 && addr <= 479) 
    {
        switch(addr)
        {
            default:
                *pValue = 0;
                break;
        }
    }

    /* 保护时间 */
    else if(addr >= 600 && addr <= 699) 
    {
        switch(addr)
        {
            case 600:
            {
                *pValue = 600;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_OF, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 601:
            {
                *pValue = 601;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_OF, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 602:
            {
                *pValue = 602;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_OF_THR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 603:
            {
                *pValue = 603;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_UF, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 604:
            {
                *pValue = 604;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_UF, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 605:
            {
                *pValue = 605;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_UF_THR, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 608:
            {
                *pValue = 608;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_OF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 609:
            {
                *pValue = 609;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_OF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 610:
            {
                *pValue = 610;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_OF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 611:
            {
                *pValue = 611;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_UF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 612:
            {
                *pValue = 612;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_UF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 613:
            {
                *pValue = 613;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_UF_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 616:
            {
                *pValue = 616;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_AC_OV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 617:
            {
                *pValue = 617;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_AC_OV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 618:
            {
                *pValue = 618;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_OV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 619:
            {
                *pValue = 619;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L1_AC_UV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 620:
            {
                *pValue = 620;
                #if 1
                FuncInf_GetProtectThreshold(FUNCINF_THRSHD_TYPE_L2_AC_UV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 621:
            {
                *pValue = 621;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_3L_UV_TIME, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 硬件保护 */
    else if(addr >= 700 && addr <= 799) 
    {
        switch(addr)
        {
            case 704:
            {
                *pValue = 704;
                #if 1
                addrTmp = 18;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 705:
            {
                *pValue = 705;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_LEAK_CUR, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 706:
            {
                *pValue = 706;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_HIG_TEMP_DERATE, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 707:
            {
                *pValue = 707;
                #if 1
                FuncInf_GetArmThrshd(FUNCINF_ARM_THR_TYPE_TEMP_DIFF, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
            
        }
    }

    /* MPPT */
    else if(addr >= 900 && addr <= 999) 
    {
        switch(addr)
        {
            default:
                *pValue = 0;
                break;
        }
    }

    /* 尖峰平谷 */
    else if(addr >= 1200 && addr <= 1300) 
    {
        switch(addr)
        {
            case 1200:
            {
                *pValue = 1200;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_1, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1201:
            {
                *pValue = 1201;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_1, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1202:
            {
                *pValue = 1202;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1203:
            {
                *pValue = 1203;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1205:
            {
                *pValue = 1205;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_2, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1206:
            {
                *pValue = 1206;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_2, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1207:
            {
                *pValue = 1207;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_2, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1208:
            {
                *pValue = 1208;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1210:
            {
                *pValue = 1210;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_3, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1211:
            {
                *pValue = 1211;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_3, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1212:
            {
                *pValue = 1212;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_3, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1213:
            {
                *pValue = 1213;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1215:
            {
                *pValue = 1215;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_4, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1216:
            {
                *pValue = 1216;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_4, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1217:
            {
                *pValue = 1217;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_4, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1218:
            {
                *pValue = 1218;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1220:
            {
                *pValue = 1220;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_5, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1221:
            {
                *pValue = 1221;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_5, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1222:
            {
                *pValue = 1222;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_5, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1223:
            {
                *pValue = 1223;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1225:
            {
                *pValue = 1225;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_6, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1226:
            {
                *pValue = 1226;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_6, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1227:
            {
                *pValue = 1227;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_6, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1228:
            {
                *pValue = 1228;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1230:
            {
                *pValue = 1230;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_7, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1231:
            {
                *pValue = 1231;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_7, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1232:
            {
                *pValue = 1232;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_7, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1233:
            {
                *pValue = 1233;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
            
            case 1235:
            {
                *pValue = 1235;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_BEGIN_8, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1236:
            {
                *pValue = 1236;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_END_8, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }
            
            case 1237:
            {
                *pValue = 1237;
                #if 1
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_8, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 1238:
            {
                *pValue = 1238;
                #if 0
                FuncInf_GetPeriodParam(FUNCINF_PERIOD_PARAM_TYPE_POWER_1, pValue);
                #endif
                break;
            }
                    
            case 1299:
            {
                *pValue = 1299;
                #if 1
                FuncInf_GetStrategySwitch(FUNCINF_STRTG_SWITCH_TYPE_TIME_PERIOD, pValue);
                #endif
                break;
            }
            
            case 1300:
            {
                #if 1
                FuncInf_GetPowerFactor(NULL, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* CMD命令直接操作 */
    else if(addr >= 1301 && addr <= 1310)
    {
        switch(addr)
        {
            case 1301:
            {
                *pValue = 1301;
                #if 1                  
                FuncInf_GetCmd(FUNCINF_CMD_IDX_0, pValue);
                #endif
                break;
            }
            
            case 1302:
            {
                *pValue = 1302;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_1, pValue);
                #endif
                break;
            }
            
            case 1303:
            {
                *pValue = 1303;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_2, pValue);
                #endif
                break;
            }
            
            case 1304:
            {
                *pValue = 1304;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_3, pValue);
                #endif
                break;
            }
            
            case 1305:
            {
                *pValue = 1305;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_4, pValue);
                #endif
                break;
            }
            
            case 1306:
            {
                *pValue = 1306;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_5, pValue);
                #endif
                break;
            }
            
            case 1307:
            {
                *pValue = 1307;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_6, pValue);
                #endif
                break;
            }
            
            case 1308:
            {
                *pValue = 1308;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_7, pValue);
                #endif
                break;
            }
            
            case 1309:
            {
                *pValue = 1309;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_8, pValue);
                #endif
                break;
            }
            
            case 1310:
            {
                *pValue = 1310;
                #if 1
                FuncInf_GetCmd(FUNCINF_CMD_IDX_9, pValue);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 1547 */
    else if(addr >= 2000 && addr <= 2099) 
    {
        switch(addr)
        {
            /*故障恢复+软启动*/
            case 2000:
            {
                *pValue = 2000;
                #if 1
                FuncInf_GetStrategySwitch(FUNCINF_STRTG_SWITCH_TYPE_FAULT_REC, &tempU16);
                FuncInf_GetStrategySwitch(FUNCINF_STRTG_SWITCH_TYPE_SOFT_BOOTUP, &temp1U16);
                if(tempU16 == 1 && temp1U16 == 1)
                {
                    *pValue = 1;
                }else
                {
                    *pValue = 0;
                }
                #endif
                break;
            }
            
            /*故障恢复时间*/
            case 2001:
            {
                *pValue = 2001;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*随机延时*/
            case 2002:
            {
                *pValue = 2002;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*故障恢复的软启时间*/
            case 2003:
            {
                *pValue = 2003;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*软启目标功率*/
            case 2004:
            {
                *pValue = 2004;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*交流电压最高值*/
            case 2005:
            {
                *pValue = 2005;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*交流电压最低值*/
            case 2006:
            {
                *pValue = 2006;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*交流频率最高值*/
            case 2007:
            {
                *pValue = 2007;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*交流频率最低值*/
            case 2008:
            {
                *pValue = 2008;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*预留*/
            case 2009:
            {
                *pValue = 2009;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            /*恒定功率因数使能位*/
            case 2010:
            {
                *pValue = 2010;
                #if 1
                mode1547switch = Ieee1547_GetModeSwitch(MODE_CPF);
                if(mode1547switch == MODE_SWITCH_ON)
                {
                    *pValue = 1;
                }else if(mode1547switch == MODE_SWITCH_OFF)
                {
                    *pValue = 0;
                }
                #endif
                break;
            }

            /*恒定PF_功率因数*/
            case 2011:
            {
                *pValue = 2011;
                #if 1
                FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_CPF_PF, &fltVal);
                *pValue = (int16_t)(fltVal * 100);
                #endif
                break;
            }

            /*恒定PF_有功功率*/
            case 2012:
            {
                *pValue = 2012;
                #if 1
                *pValue = 0;
                #endif
                break;
            }

            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 描述和版本 */
    else if(addr >= 3000 && addr <= 3019) 
    {
        switch(addr)
        {
            case 3011:
            {
                *pValue = 3011;
                #if 1
                addrTmp = 335;
                FuncInf_DirectReadFpga(addrTmp, pValue);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* 实时重要参数 */
    else if(addr >= 3020 && addr <= 3029) 
    {
        switch(addr)
        {
            case 3020:
            {
                *pValue = 3020;
                #if 1
                {
                    FuncInf_GetFsm(FUNCINF_FSM_TYPE_THIS_TIME, &fsm);
                    if (fsm == FUNCINF_FSM_IDLE)
                    {
                        *pValue = 0;
                    }
                    else if (fsm == FUNCINF_FSM_WORKING)
                    {
                        *pValue = 1;
                    }
                    else if (fsm == FUNCINF_FSM_FAULT)
                    {
                        *pValue  = 2;
                    }
                }
                #endif
                break;
            }

            case 3021:
            {
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3022:
            {
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            
            case 3023:
            {
                *pValue = 3023;
                #if 1 /* 上次开关机记录1 */
                GlobalVariable_GetUint16(GV_UINT16_PREVONOFFCOMMANDER, &tempU16);
                *pValue = tempU16;
                #endif
                break;
            }
            

            case 3024:
            {
                b16Data.u16Data = 0;
                *pValue = 3024;
                #if 1 /* 通讯故障 */
                state = COMM_STATE_INIT;

                for(idxDev = 0; idxDev < COMM_DEVICE_QTY; idxDev++)
                {
                    FuncInf_GetCommunicateSwitch(idxDev,&comSwitch);
                    //printf("[%s][%d] idxDev[%d] comSwitch[%d]\n", __func__, __LINE__, idxDev, comSwitch);
                    if(comSwitch == 0)
                    {
                        SET_BIT(b16Data.u16Data, idxDev);
                    }else if(comSwitch == 1)
                    {
                        CommMonitor_GetCommState(idxDev, &state);
                        //printf("[%s][%d] idxDev[%d] state[%d]\n", __func__, __LINE__, idxDev, state);
                        state == COMM_STATE_ONLINE ? SET_BIT(b16Data.u16Data, idxDev) : CLEAR_BIT(b16Data.u16Data, idxDev);
                    }
                }
                *pValue = b16Data.u16Data;
                #endif
                break;
            }
            

            case 3025:
            {
                *pValue = 3025;
                #if 1
                /* pcs变额原因0 */
                RatedLimit_GetReason(0, pValue);
                #endif
                break;
            }
            

            case 3026:
            {
                *pValue = 3026;
                #if 1
                /* pcs变额原因1 */
                RatedLimit_GetReason(1, pValue);
                *pValue = ~(*pValue);
                #endif
                break;
            }
            
                
            case 3027:
            {
                *pValue = 3027;
                #if 1/* 绝缘 */
                *pValue = 0;
                #endif
                break;
            }

            case 3028:
            {
                *pValue = 3026;
                #if 1
                /* pcs变额原因2预留 */
                RatedLimit_GetReason(2, pValue);
                #endif
                break;
            }

            case 3029:
            {
                *pValue = 3026;
                #if 1
                /* pcs变额原因3预留 */
                RatedLimit_GetReason(3, pValue);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* AC交流 */
    else if(addr >= 3030 && addr <= 3039) 
    {
        switch(addr)
        {
            case 3030:
            {
                *pValue = 3030;
                #if 1
                FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_A, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3031:
            {
                *pValue = 3031;
                #if 1
                FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_B, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3032:
            {
                *pValue = 3032;
                #if 1
                FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_C, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3033:
            {
                *pValue = 3033;
                #if 1
                FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_A, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3034:
            {
                *pValue = 3034;
                #if 1
                FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_B, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3035:
            {
                *pValue = 3035;
                #if 1
                FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_C, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3036:
            {
                *pValue = 3036;
                #if 1
                FuncInf_GetPower(FUNCINF_PWR_TYPE_ACT, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3037:
            {
                *pValue = 3037;
                #if 1
                FuncInf_GetPower(FUNCINF_PWR_TYPE_REACT, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3038:
            {
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3039:
            {
                *pValue = 3039;
                #if 1
                FuncInf_GetFrequency(NULL, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* BUS母线 */
    else if(addr >= 3040 && addr <= 3049) 
    {
        switch(addr)
        {
            case 3040:
            {
                *pValue = 3040;
                #if 1
                FuncInf_GetVoltage(FUNCINF_VOL_TYPE_BUS, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3043:
            {
                *pValue = 3043;
                #if 1
                FuncInf_GetCurrent(FUNCINF_CUR_TYPE_BUS, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3046:
            {
                *pValue = 3046;
                #if 1
                FuncInf_GetPower(FUNCINF_PWR_TYPE_BUS, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* DC1电池 */
    else if(addr >= 3050 && addr <= 3059) 
    {
        switch(addr)
        {
            case 3050:
            {
                *pValue = 3050;
                #if 1
                FuncInf_GetVoltage(FUNCINF_VOL_TYPE_BAT, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3051:
            {
                *pValue = 3051;
                #if 1
                addrTmp = 265;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3052:
            {
                *pValue = 3052;
                #if 1
                addrTmp = 266;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3053:
            {
                *pValue = 3053;
                #if 1
                FuncInf_GetCurrent(FUNCINF_CUR_TYPE_BAT, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3054:
            {
                *pValue = 3054;
                #if 1
                addrTmp = 270;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3056:
            {
                *pValue = 3056;
                #if 1
                FuncInf_GetPower(FUNCINF_PWR_TYPE_BAT, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }   

    /* 一次调频相关数据 */
    else if(addr >= 3080 && addr <= 3089) 
    {
        switch(addr)
        {
            case 3080:
            {
                *pValue = 3080;
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3081:
            {
                *pValue = 3081;
                #if 1
                addrTmp = 192;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3082:
            {
                *pValue = 3082;
                #if 1
                addrTmp = 258;
                FuncInf_DirectReadFpga(addrTmp, &fpgaValue);
                RatioCoef_GetRealValue(addrTmp, fpgaValue, &fltVal);
                *pValue = (int16_t)(fltVal * 10);
                #endif
                break;
            }
            
            case 3083:
            {
                *pValue = 3083;
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3084:
            {
                *pValue = 3084;
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3085:
            {
                *pValue = 3085;
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            case 3086:
            {
                *pValue = 3086;
                #if 1
                *pValue = 0;
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    } 

    /* 绝缘检测信息 */
    else if(addr >= 3090 && addr <= 3109) 
    {
        GetIsoBoardInfor(&ibdinfor);
        switch(addr)
        {
            case 3090:
            {
                *pValue = 3090;
                #if 1
                *pValue = ibdinfor.temp[0];
                #endif
                break;
            }
            
            case 3091:
            {
                *pValue = 3091;
                #if 1
                *pValue = ibdinfor.temp[1];
                #endif
                break;
            }
            
            case 3092:
            {
                *pValue = 3092;
                #if 1
                *pValue = ibdinfor.temp[2];
                #endif
                break;
            }
            
            case 3093:
            {
                *pValue = 3093;
                #if 1
                *pValue = ibdinfor.temp[3];
                #endif
                break;
            }
            
            case 3094:
            {
                *pValue = 3094;
                #if 1
                *pValue = ibdinfor.temp[4];
                #endif
                break;
            }
            
            case 3095:
            {
                *pValue = 3095;
                #if 1
                *pValue = ibdinfor.temp[5];
                #endif
                break;
            }
            
            case 3096:
            {
                *pValue = 3096;
                #if 1
                *pValue = ibdinfor.temp[6];
                #endif
                break;
            }
            
            case 3097:
            {
                *pValue = 3097;
                #if 1
                *pValue = ibdinfor.temp[7];
                #endif
                break;
            }
            
            case 3098:
            {
                *pValue = 3098;
                #if 1
                *pValue = ibdinfor.volGridAB * 10;
                #endif
                break;
            }
            
            case 3099:
            {
                *pValue = 3099;
                #if 1
                *pValue = ibdinfor.volGridBC * 10;
                #endif
                break;
            }
            
            case 3100:
            {
                *pValue = 3100;
                #if 1
                *pValue = ibdinfor.volGridCA * 10;
                #endif
                break;
            }
            
            case 3101:
            {
                *pValue = 3101;
                #if 1
                *pValue = ibdinfor.isoResPos;
                #endif
                break;
            }
            
            case 3102:
            {
                *pValue = 3102;
                #if 1
                *pValue = ibdinfor.isoResNeg;
                #endif
                break;
            }
            
            case 3103:
            {
                *pValue = 3103;
                #if 1
                *pValue = ibdinfor.curGridA * 10;
                #endif
                break;
            }
            
            case 3104:
            {
                *pValue = 3104;
                #if 1
                *pValue = ibdinfor.curGridB * 10;
                #endif
                break;
            }
            
            case 3105:
            {
                *pValue = 3105;
                #if 1
                *pValue = ibdinfor.curGridC * 10;
                #endif
                break;
            }
            
            case 3106:
            {
                *pValue = 3106;
                #if 1
                *pValue = ibdinfor.curLeak * 10;
                #endif
                break;
            }
            
            case 3107:
            {
                *pValue = 3107;
                #if 1
                *pValue = ibdinfor.isoVolPos;
                #endif
                break;
            }
            
            case 3108:
            {
                *pValue = 3108;
                #if 1
                *pValue = ibdinfor.isoVolNeg;
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    } 

    /* IGBT温度 */
    else if(addr >= 3130 && addr <= 3139) 
    {
        switch(addr)
        {
            case 3130:
            {
                *pValue = 3130;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_A0, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 3131:
            {
                *pValue = 3131;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_B0, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 3132:
            {
                *pValue = 3132;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_C0, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 3133:
            {
                *pValue = 3133;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_A1, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 3134:
            {
                *pValue = 3134;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_B1, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            case 3135:
            {
                *pValue = 3135;
                #if 1
                FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_C1, &fltVal);
                *pValue = (int16_t)fltVal;
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    } 	

    /* 系统状态 */
    else if(addr >= 3140 && addr <= 3199) 
    {
        // printf("[%s][%d] addr[%d] \n", __func__, __LINE__, addr);
        if(addr <= 3171)
        {
            if(addr <= 3155)
            {
                FuncInf_GetStateRegister(addr - 3140, pValue);
                // printf("[%s][%d] addr[%d] *pValue[%d] \n", __func__, __LINE__, addr, *pValue);
            }
            else if(addr > 3155 && addr <= 3171)
            {
                FuncInf_GetFaultRegister(addr - 3156, pValue);
                // printf("[%s][%d] addr[%d] *pValue[%d] \n", __func__, __LINE__, addr, *pValue);
            }
        }
        else 
        {
            #if 1
            *pValue = 0;
            #endif
        }
    } 	

    /* 发电量 */
    else if(addr >= 3400 && addr <= 3599) 
    {
        switch(addr)
        {
            case 3400:
            {
                *pValue = 3400;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3401:
            {
                *pValue = 3401;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3402:
            {
                *pValue = 3402;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3403:
            {
                *pValue = 3403;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3404:
            {
                *pValue = 3404;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3405:
            {
                *pValue = 3405;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3406:
            {
                *pValue = 3406;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3407:
            {
                *pValue = 3407;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3440:
            {
                *pValue = 3440;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3441:
            {
                *pValue = 3441;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3442:
            {
                *pValue = 3442;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3443:
            {
                *pValue = 3443;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }

            case 3444:
            {
                *pValue = 3444;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3445:
            {
                *pValue = 3445;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3446:
            {
                *pValue = 3446;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3447:
            {
                *pValue = 3447;
                #if 1
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3490:
            {
                *pValue = 3490;
                #if 1
                elecQutt = eqsQuttDataYesterdayGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3491:
            {
                *pValue = 3491;
                #if 1
                elecQutt = eqsQuttDataYesterdayGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3492:
            {
                *pValue = 3492;
                #if 1
                elecQutt = eqsQuttDataMonthGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3493:
            {
                *pValue = 3493;
                #if 1
                elecQutt = eqsQuttDataMonthGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            

            case 3494:
            {
                *pValue = 3494;
                #if 1
                elecQutt = eqsQuttDataYearGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3495:
            {
                *pValue = 3495;
                #if 1
                elecQutt = eqsQuttDataYearGet(IS_DISC, BRANCH_TYPE_AC);
                tempU32 = (int32_t)(elecQutt * 10);
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            
            case 3500:
            {
                *pValue = 3500;
                #if 1
                /* 当日充电电量L */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3501:
            {
                *pValue = 3501;
                #if 1
                /* 当日充电电量H */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_DAY, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            
            case 3502:
            {
                *pValue = 3502;
                #if 1
                /* 当日放电电量L */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3503:
            {
                *pValue = 3503;
                #if 1
                /* 当日放电电量H */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_DC_DISC_DAY, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            
            case 3504:
            {
                *pValue = 3504;
                #if 1
                /* 交流总充电量L */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3505:
            {
                *pValue = 3505;
                #if 1
                /* 交流总充电量H */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_CHRG_TOT, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            
            case 3506:
            {
                *pValue = 3506;
                #if 1
                /* 交流总放电量L */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 >> 16;
                #endif
                break;
            }
            
            case 3507:
            {
                *pValue = 3507;
                #if 1
                /* 交流总放电量H */
                FuncInf_GetElectricQuantity(FUNCINF_ELEC_QUTT_TYPE_AC_DISC_TOT, &elecQutt);
                tempU32 = (int32_t)elecQutt;
                *pValue = tempU32 & 0xFFFF;
                #endif
                break;
            }
            
            default:
            {
                *pValue = 0;
                break;
            }
        }
    }

    /* AC充放电量日期 */
    else if(addr >= 3600 && addr <= 3603)
    {
        peqdata = eqsQuttDataDBGet();
        switch(addr)
        {
            case 3600:
            {
                break;
            }

            case 3601:
            {
                *pValue = peqdata->year;
                break;
            }

            case 3602:
            {
                *pValue = peqdata->month;
                break;
            } 

            case 3603:
            {
                *pValue = peqdata->day;
                break;
            }  
        }
    }

    /* AC发电量、AC充电量历史 */
    else if(addr >= 3604 && addr <= 3871) 
    {
        isChrgOrDisc = (isChrgOrDisc_t)((addr - 3604) / 134);
        branchtype = (branchType_t)((addr - 3604) / 134);
        peqdata = eqsQuttDataDBGet();
        memcpy(&eqdata, peqdata, sizeof(struct elecQuttDataDB));

        /*发电量*/
        if(addr >= 3604 && addr <= 3737)
        {
            /*一天24小时发电量*/
            if(addr >= 3604 && addr <= 3651)
            {
                dataType = ELEC_QUTT_DATA_HOUR;
                eqdata.hour = (addr - 3604) / 2;
            }

            /*一月31天发电量*/
            else if(addr >= 3652 && addr <= 3713)
            {
                dataType = ELEC_QUTT_DATA_DAY;
                eqdata.day = ((addr - 3652) / 2) + 1;
            }

            /*一年12月发电量*/
            else if(addr >= 3714 && addr <= 3737)
            {
                dataType = ELEC_QUTT_DATA_MONTH;
                eqdata.month = ((addr - 3714) / 2) + 1;
            }
        }

        /*充电量*/
        if(addr >= 3738 && addr <= 3871)
        {
            /*一天24小时充电量*/
            if(addr >= 3738 && addr <= 3785)
            {
                dataType = ELEC_QUTT_DATA_HOUR;
                eqdata.hour = (addr - 3738) / 2;
            }

            /*一月31天充电量*/
            else if(addr >= 3786 && addr <= 3847)
            {
                dataType = ELEC_QUTT_DATA_DAY;
                eqdata.day = ((addr - 3784) / 2) + 1;
            }
            
            /*一年12月充电量*/
            else if(addr >= 3848 && addr <= 3871)
            {
                dataType = ELEC_QUTT_DATA_MONTH;
                eqdata.month = ((addr - 3846) / 2) + 1;
            }
        }

        elecQutt = eqsQuttDataDetailGet(isChrgOrDisc, branchtype, dataType, &eqdata);
        tempU32 = (int32_t)elecQutt;
        if((addr & 0x1) == 0)
        {
            
            *pValue = tempU32 >> 16;
        }
        else
        {
            *pValue = tempU32 & 0xFFFF;
        }
    }

    /* 电表数据 */
    else if(addr >= 5000 && addr <= 5099) 
    {
        *pValue = 0;
    }

    /* BMS数据 */
    else if(addr >= 5100 && addr <= 5299) 
    {
        *pValue = 0;
    }

    /* 设备支持的模式 */
    else if(addr == 6000)
    {
        *pValue = 0x43; /* VSG-PQ-VF */
    }

    else
    {
        printf("addr[%d] Not process !!!\n", addr);
        *pValue = 0;
    }
       
    return retVal;
}


int HmiTable_SetCallback(tableEntry_t *pEntry)
{
    uint16_t dataFpga = 0;
    int retVal = 0;
    uint32_t addr = pEntry->idx;
    uint32_t addrTmp = 0;
    uint16_t value = pEntry->data;

    int16_t dataS16 = 0;
    int32_t tempI32 = 0;
    float realvalue = 0;
    
    funcInfCtrlMode_t ctrlmode;
    struct elecQuttDataDB* peqdata;

    /* 控制模式 */
    if(addr == 310)
    {
        printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
        #if 1
        if (value == 1)
        {
            /* 远程 */
            FuncInf_SetCtrlMode(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_CTRL_MODE_REMOTE);
        }
        else if (value == 4)
        {
            /* 本地 */
            FuncInf_SetCtrlMode(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_CTRL_MODE_LOCAL);
        }
        retVal = 0;
        #endif
    }

    else
    {
        #if 1
        FuncInf_GetCtrlMode(NULL, &ctrlmode);
        if(ctrlmode != FUNCINF_CTRL_MODE_LOCAL)
        {
            printf("[%s]: 当前不是本地模式，触摸屏操作被忽略 ctrlmode[%d]\n", __func__, ctrlmode);
            retVal = 1;
            return retVal;
        }
        #endif

        FuncInf_GetCtrlMode(NULL, &ctrlmode);
        if(ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
        {
            retVal = 0;
        }else if(ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
        {
            retVal = 1;
        }

        /* FPGA参数 */
        if(addr <= 220)
        {
            printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
            #if 1
            realvalue = (float)value;
            RatioCoef_GetFpgaValue(addr, realvalue, &dataFpga);
            FuncInf_DirectWriteFpga(FUNCINF_OPERATOR_HMI, addr, dataFpga);
            #endif
        }

        /* 时间 */
        else if(addr > 300 && addr <= 309) 
        {
            switch(addr)
            {
                case 300: //写入权（没用）
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    break;
                }

                case 301: //年
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_YEAR, value);
                    #endif
                    break;
                }

                case 302: //月
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_MON, value);
                    #endif
                    break;
                }

                case 303: //日
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_DATE, value);
                    #endif
                    break;
                }

                case 306: //时
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_HOUR, value);
                    #endif
                    break;
                }

                case 307: //分
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_MIN, value);
                    #endif
                    break;
                }

                case 308: //秒
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetTime(FUNCINF_OPERATOR_HMI, FUNCINF_TIME_TYPE_SEC, value);
                    #endif
                    break;
                }    

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }
        /* 开关机 */
        else if(addr > 310 && addr <= 319)
    	{
           switch(addr)
           {				
                case 311: //运行模式
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value == 1)
                    {
                        FuncInf_SetRunMode(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_RUN_MODE_VF);
                    }
                    else if(value == 2)
                    {
                        FuncInf_SetRunMode(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_RUN_MODE_PQ);
                    }
                    else if(value == 64)
                    {
                        FuncInf_SetRunMode(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_RUN_MODE_VSG);
                    }
                    else
                    {
                        printf("Error mode!!!\n");
                    }
                    #endif
                    break;
                }
    			
                case 312: //开关机
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value == 0)
                    {
                        FuncInf_TurnOnOff(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_TURN_OFF);
                    }
                    else if(value == 1)
                    {
                        GlobalVariable_GetInt32(GV_INT32_LC_IN_FAULT, &tempI32);
                        if(tempI32 != 0)
                        {
                            printf("禁止开机：存在升压变故障!\n");
                            break;
                        }
                        else
                        {
                            FuncInf_TurnOnOff(FUNCINF_OPERATOR_HMI, NULL, FUNCINF_TURN_ON); 
                        }
                    }
                    #endif
                    break;
                }

                case 317: //策略
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetStrategySwitch(FUNCINF_OPERATOR_HMI, FUNCINF_STRTG_SWITCH_TYPE_ALL, value);
                    #endif
                    break;
                }
    				
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 以太网 */
        else if(addr >= 320 && addr <= 329) 
        {
            switch(addr)
            {
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 485 */
        else if(addr >= 330 && addr <= 339) 
        {
            switch(addr)
            {
                case 331: 
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    //HMI数据和PAC数据间的映射关系,这里默认原样映射
                    FuncInf_SetHmiSlaveId(FUNCINF_OPERATOR_HMI, NULL, value);
                    #endif
                    break;
                }

                case 332: 
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    #endif
                    break;
                }

                case 333: 
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    #endif
                    break;
                }

                case 334: 
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    #endif
                    break;
                }

                case 335: 
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    #endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* CAN */
        else if(addr >= 340 && addr <= 349) 
        {
            switch(addr)
            {
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 以太网-基本网口 */
        else if(addr >= 350 && addr <= 359) 
        {
            switch(addr)
            {
                case 350:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_IP0, value);
                    }
                    #endif
                    break;
                }

                case 351:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_IP1, value);
                    }
                    #endif
                    break;
                }

                case 352:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_IP2, value);
                    }
                    #endif
                    break;
                }

                case 353:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_IP3, value);
                    }
                    #endif
                    break;
                }

                case 354:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC0, value);
                    }
                    #endif
                    break;
                }

                case 355:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC1, value);
                    }
                    #endif
                    break;
                }

                case 356:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC2, value);
                    }
                    #endif
                    break;
                }

                case 357:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC3, value);
                    }
                    #endif
                    break;
                }

                case 358:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC4, value);
                    }
                    #endif
                    break;
                }

                case 359:
                {
                    printf("[%s][%d] addr = %d value = %d\n", __func__, __LINE__, addr, value);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        PRINT_DEBUG();
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT1_MAC5, value);
                    }
                    #endif
                    break;
                }
                    
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 以太网-扩展网口0 */
        else if(addr >= 360 && addr <= 369) 
        {
            switch(addr)
            {
                case 360:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_IP0, value);
                    }
                    #endif
                    break;
                }

                case 361:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_IP1, value);
                    }
                    #endif
                    break;
                }

                case 362:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_IP2, value);
                    }
                    #endif
                    break;
                }

                case 363:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_IP3, value);
                    }
                    #endif
                    break;
                }

                case 364:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC0, value);
                    }
                    #endif
                    break;
                }

                case 365:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC1, value);
                    }
                    #endif
                    break;
                }

                case 366:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC2, value);
                    }
                    #endif
                    break;
                }

                case 367:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC3, value);
                    }
                    #endif
                    break;
                }

                case 368:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC4, value);
                    }
                    #endif
                    break;
                }

                case 369:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT2_MAC5, value);
                    }
                    #endif
                    break;
                }
                    
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 以太网-扩展网口1 */
        else if(addr >= 370 && addr <= 379) 
        {
            switch(addr)
            {
                case 370:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_IP0, value);
                    }
                    #endif
                    break;
                }

                case 371:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_IP1, value);
                    }
                    #endif
                    break;
                }

                case 372:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_IP2, value);
                    }
                    #endif
                    break;
                }

                case 373:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_IP3, value);
                    }
                    #endif
                    break;
                }

                case 374:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC0, value);
                    }
                    #endif
                    break;
                }

                case 375:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC1, value);
                    }
                    #endif
                    break;
                }

                case 376:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC2, value);
                    }
                    #endif
                    break;
                }

                case 377:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC3, value);
                    }
                    #endif
                    break;
                }

                case 378:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC4, value);
                    }
                    #endif
                    break;
                }

                case 379:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    if(value >= 0 && value <= 255)
                    {
                        FuncInf_SetNetParam(FUNCINF_OPERATOR_HMI, FUNCINF_NET_PARAM_TYPE_PORT3_MAC5, value);
                    }
                    #endif
                    break;
                }
                    
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 其他 */
        else if(addr >= 390 && addr < 399)
        {
            switch(addr)
            {
                case 396: /* 复位 */
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_Reboot(FUNCINF_OPERATOR_HMI, NULL, NULL);
                    #endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }
        
        /* AC */
        else if(addr >= 399 && addr <= 419) 
        {
            switch(addr)
            {
                case 399: /* 频率 */
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    addrTmp = 54;
                    realvalue = (float)((value / 10) / 10);
                    RatioCoef_GetFpgaValue(addrTmp, realvalue, &dataFpga);
                    FuncInf_DirectWriteFpga(FUNCINF_OPERATOR_HMI, addrTmp, dataFpga);
                    #endif
                    break;
                }

                case 400:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_AC_OV, (float)(value / 10));
    				#endif
                    break;
                }

                case 401:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_AC_OV, (float)(value / 10));
    				#endif
                    break;
                }

                case 402:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_OV_THR, (float)(value / 10));
                    #endif
                    break;
                }

    			case 403:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_AC_OV_INST, (float)(value / 10));
    				#endif
                    break;
                }

    			case 404:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_AC_UV, (float)(value / 10));
    				#endif
                    break;
                }

                case 405:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_AC_UV, (float)(value / 10));
    				#endif
                    break;
                }

                case 406:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_UV_THR, (float)(value / 10));
                    #endif
                    break;
                }

    			case 408:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_AC_OC, (float)(value / 10));
    				#endif
                    break;
                }

                case 409:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_AC_OC, (float)(value / 10));
    				#endif
                    break;
                }

                case 410:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_AC_OC, (float)(value / 10));
    				#endif
                    break;
                }

    			case 411:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_AC_OC_INST, (float)(value / 10));
    				#endif
                    break;
                }

    			case 412:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_AC_CUR, (float)(value / 10));
    				#endif
                    break;
                }

    			case 413:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_AC_CUR, (float)(value / 10));
    				#endif
                    break;
                }

    			case 414:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_AC_PWR_DISC, (float)(value / 10));
    				#endif
                    break;
                }

    			case 415:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_AC_PWR_CHRG, (float)((int16_t)value / 10));
    				#endif
                    break;
                }

    			case 416:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1

                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_AC_VOL, (float)(value / 10));
    				#endif
                    break;
                }

    			case 417:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    dataS16 = (int16_t)value;
                    FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_MODE_EN, &modeSwitch1547_FP);
                    if(modeSwitch1547_FP == 0)
                    {
                        //Ieee1547_ModeFP_ActPwrSet(dataS16);
                    }

                    FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_MODE_EN, &modeSwitch1547_VP);
                    if(modeSwitch1547_VP == 0)
                    {
                        //Ieee1547_ModeVP_AbsorbActPwrSet(dataS16);
                    }

                    FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_Q_MODE_SEL, &(modeSwitch1547.u16Data));
                    if(modeSwitch1547.bitData.b3 == 0)
                    {
                        addrTmp = 26;
                        RatioCoef_GetFpgaValue(addrTmp, (float)dataS16, &pwrFpga);
                        FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)pwrFpga);
                        //Ieee1547_ModeCPF_ActPwrSet(dataS16);
                    }
                    else if(modeSwitch1547.bitData.b1 == 0)
                    {
                        addrTmp = 26;
                        RatioCoef_GetFpgaValue(addrTmp, (float)dataS16, &pwrFpga);
                        FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)pwrFpga);
                    }
                    

                    if(modeSwitch1547_FP == 1 && modeSwitch1547_VP == 1 && modeSwitch1547.bitData.b3 == 1 && modeSwitch1547.bitData.b1 == 1)
                    {
                        addrTmp = 26;
                        RatioCoef_GetFpgaValue(addrTmp, (float)dataS16, &pwrFpga);
                        FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)pwrFpga);
                    }
    				#endif
                    dataS16 = (int16_t)value;
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)dataS16 / 10);
                    break;
                }

    			case 418:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    dataS16 = (int16_t)value;
                    FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_Q_MODE_SEL, &(modeSwitch1547.u16Data));
                    if(modeSwitch1547.bitData.b0 == 0)
                    {
                        //Ieee1547_ModeCQ_ReactPwrSet(dataS16);
                    }

                    if(modeSwitch1547.bitData.b0 == 1 && modeSwitch1547.bitData.b3 == 1 && modeSwitch1547.bitData.b2 == 1 && modeSwitch1547.bitData.b1 == 1)
                    {
                        addrTmp = 26;
                        RatioCoef_GetFpgaValue(addrTmp, (float)(dataS16 + 0 * 10), &pwrFpga);
                        FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)pwrFpga);
                        //Q_Set(dataS16);
                    }
    				#endif
                    dataS16 = (int16_t)value;
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_REACT_PWR, (float)dataS16 / 10);
                    break;
                }

    			case 419:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_DC_VOL, (float)(value / 10));
    				#endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* BUS */
        else if(addr >= 420 && addr <= 439) 
    	{
            switch(addr)
            {
                case 420:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_DC_OV, (float)(value / 10));
    				#endif
                    break;
                }

    			case 423:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_DC_OV_INST, (float)(value / 10));
    				#endif
                    break;
                }

    			case 424:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_DC_UV, (float)(value / 10));
    				#endif
                    break;
                }

    			case 428:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_DC_OC, (float)(value / 10));
    				#endif
                    break;
                }

    			case 431:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_DC_OC_INST, (float)(value / 10));
    				#endif
                    break;
                }

    			case 432:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_CUR_DISC, (float)(value / 10));
    				#endif
                    break;
                }

    			case 433:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_CUR_CHRG, (float)((int16_t)value / 10));
    				#endif
                    break;
                }

    			case 434:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_PWR_DISC, (float)(value / 10));
    				#endif
                    break;
                }

    			case 435:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_PWR_CHRG, (float)((int16_t)value / 10));
    				#endif
                    break;
                }

    			case 436:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_DC_VOL, (float)(value / 10));
    				#endif
                    break;
                }

    			default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* DC1 */
        else if(addr >= 440 && addr <= 459) 
        {
            switch(addr)
            {
                case 440:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_BAT_OV, (float)(value / 10));
                    #endif
                    break;
                }

                case 443:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_BAT_OV_INST, (float)(value / 10));
                    #endif
                    break;
                }

                case 444:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_BAT_UV, (float)(value / 10));
                    #endif
                    break;
                }

                case 448:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_BAT_OC, (float)(value / 10));
                    #endif
                    break;
                }

                case 451:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_BAT_OC_INST, (float)(value / 10));
                    #endif
                    break;
                }

                case 452:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_CUR_DISC, (float)(value / 10));
                    #endif
                    break;
                }

                case 453:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_CUR_CHRG, (float)((int16_t)value / 10));
                    #endif
                    break;
                }

                case 454:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_PWR_DISC, (float)(value / 10));
                    #endif
                    break;
                }

                case 455:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetLimit(FUNCINF_OPERATOR_HMI, FUNCINF_LMT_TYPE_DC_PWR_CHRG, (float)((int16_t)value / 10));
                    #endif
                    break;
                }

                case 456:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_DC_VOL, (float)(value / 10));
                    #endif
                    break;
                }

                case 459:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetAppointValue(FUNCINF_OPERATOR_HMI, FUNCINF_APPOINT_TYPE_DC_VOL, (float)(value / 10));
                    #endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* DC2 */
        else if(addr >= 460 && addr <= 479) 
        {
            switch(addr)
            {
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 保护时间 */
        else if(addr >= 600 && addr <= 699) 
        {
            switch(addr)
            {
                case 600:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_OF, (float)(value / 10));
                    #endif
                    break;
                }

                case 601:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_OF, (float)(value / 10));
                    #endif
                    break;
                }

                case 602:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_OF_THR, (float)(value / 10));
                    #endif
                    break;
                }

                case 603:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_UF, (float)(value / 10));
                    #endif
                    break;
                }

                case 604:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_UF, (float)(value / 10));
                    #endif
                    break;
                }

                case 605:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_UF_THR, (float)(value / 10));
                    #endif
                    break;
                }

                case 608:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_OF_TIME, (float)value);
                    #endif
                    break;
                }

                case 609:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetProtectThreshold(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_OF_TIME, (float)value);
                    #endif
                    break;
                }

                case 610:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_OF_TIME, (float)value);
                    #endif
                    break;
                }

                case 611:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_UF_TIME, (float)value);
                    #endif
                    break;
                }

                case 612:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_UF_TIME, (float)value);
                    #endif
                    break;
                }

                case 613:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_UF_TIME, (float)value);
                    #endif
                    break;
                }

                case 616:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_AC_OV_TIME, (float)value);
                    #endif
                    break;
                }

                case 617:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_AC_OV_TIME, (float)value);
                    #endif
                    break;
                }

                case 618:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_OV_TIME, (float)(value / 10));
                    #endif
                    break;
                }

                case 619:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L1_AC_UV_TIME, (float)value);
                    #endif
                    break;
                }

                case 620:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_THRSHD_TYPE_L2_AC_UV_TIME, (float)value);
                    #endif
                    break;
                }

                case 621:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_3L_UV_TIME, (float)(value / 10));
                    #endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 硬件保护 */
        else if(addr >= 700 && addr <= 799) 
        {
            switch(addr)
            {
                case 704:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    addrTmp = 18;
                    realvalue = (float)(value / 10);
                    RatioCoef_GetFpgaValue(addrTmp, realvalue, &dataFpga);
    	            FuncInf_DirectWriteFpga(FUNCINF_OPERATOR_HMI, addrTmp, dataFpga);
                    #endif
                    break;
                }
 
                case 705:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_LEAK_CUR, (float)value);
                    #endif
                    break;
                }

                case 706:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetArmThrshd(FUNCINF_OPERATOR_HMI, FUNCINF_ARM_THR_TYPE_HIG_TEMP_DERATE, (float)(value / 10));
                    #endif
                    break;
                }

                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 电池充电、放电电压限制 */
        else if(addr >= 810 && addr <= 820) 
        {
            switch(addr)
            {
                case 810:
                {
                    #if 1
                    FuncInf_SetExtremeValue(FUNCINF_OPERATOR_HMI, FUNCINF_EXTR_VAL_TYPE_DC_U_MAX, (float)(value / 10));
                    #endif
                    break;
                }

                case 811:
                {
                    #if 1
                    FuncInf_SetExtremeValue(FUNCINF_OPERATOR_HMI, FUNCINF_EXTR_VAL_TYPE_DC_U_MIN, (float)(value / 10));
                    #endif
                    break;
                }

                default:
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    break;
            }
        }

        /* MPPT */
        else if(addr >= 900 && addr <= 999) 
    	{
            switch(addr)
            {
                default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
            }
        }

        /* 尖峰平谷 */
    	else if(addr >= 1200 && addr <= 1300) 
    	{
    		switch(addr)
    		{
    			case 1200:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_1, (float)value / 100);
    		        #endif
                    break;
                }

    		    case 1201:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_1, (float)value / 100);
    		        #endif
                    break;
                }

    			case 1202:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_1, ((float)(int16_t)value) / 10);
    		        #endif
                    break;
                }

    			case 1203:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    comData.cd_dataType = COM_DATA_TYPE_INT16;
                    comData.cd_dataValue.int16Value = value;
                    PACTable_Write_Interface(PAC_ADDR_TRANS_CAP, value);
    		        #endif
                    break;
                }

    				
    			case 1205:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_2, (float)value / 100);
    		        #endif
                    break;
                }

    		    case 1206:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_2, (float)value / 100);
    		        #endif
                    break;
                }
	
    			case 1207:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_2, ((float)(int16_t)value) / 10);
    		        #endif
                    break;
                }

    			case 1208:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    				
    			case 1210:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_3, (float)value / 100);
    		        #endif
                    break;
                }

    		    case 1211:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_3, (float)value / 100);
    		        #endif
                    break;
                }

    			case 1212:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_3, ((float)(int16_t)value) / 10);
    		        #endif
                    break;
                }

    			case 1213:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }


    			case 1215:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_4, (float)value / 100);
    		        #endif
                    break;
                }

    		    case 1216:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_4, (float)value / 100);
    		        #endif
                    break;
                }

    			case 1217:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_4, ((float)(int16_t)value) / 10);
    		        #endif
                    break;
                }

    			case 1218:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    				
    			case 1220:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_5, (float)value / 100);
    		        #endif
                    break;
                }

    		    case 1221:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_5, (float)value / 100);
    		        #endif
                    break;
                }

    			case 1222:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_5, ((float)(int16_t)value) / 10);
    		        #endif
                    break;
                }

    			case 1223:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    			
    			case 1225:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_6, (float)value / 100);
    				#endif
                    break;
                }

    			case 1226:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_6, (float)value / 100);
    				#endif
                    break;
                }

    			case 1227:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_6, ((float)(int16_t)value) / 10);
    				#endif
                    break;
                }

    			case 1228:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    			
    			case 1230:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_7, (float)value / 100);
    				#endif
                    break;
                }

    			case 1231:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_7, (float)value / 100);
    				#endif
                    break;
                }

    			case 1232:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_7, ((float)(int16_t)value) / 10);
    				#endif
                    break;
                }

    			case 1233:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    				
    			case 1235:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_BEGIN_8, (float)value / 100);
    				#endif
                    break;
                }

    			case 1236:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_END_8, (float)value / 100);
    				#endif
                    break;
                }

    			case 1237:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetPeriodParam(FUNCINF_OPERATOR_HMI, FUNCINF_PERIOD_PARAM_TYPE_POWER_8, ((float)(int16_t)value) / 10);
    				#endif
                    break;
                }
	
    			case 1238:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    		        #endif
                    break;
                }

    					
    			case 1299:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetStrategySwitch(FUNCINF_OPERATOR_HMI, FUNCINF_STRTG_SWITCH_TYPE_TIME_PERIOD, value);
    				#endif
                    break;
                }

    			case 1300:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
    				#endif
                    break;
                }

    			
    			default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
    		}
    	}

        /* CMD命令直接操作 */
    	else if(addr >= 1301 && addr <= 1310) 
    	{
            switch(addr)
    		{
    			case 1301:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1					
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_0, value);
    				#endif
                    break;
                }

    			case 1302:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_1, value);
    				#endif
                    break;
                }

    			case 1303:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_2, value);
    				#endif
                    break;
                }

    			case 1304:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_3, value);
    				#endif
                    break;
                }

    			case 1305:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_4, value);
    				#endif
                    break;
                }

    			case 1306:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_5, value);
    				#endif
                    break;
                }

    			case 1307:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_6, value);
    				#endif
                    break;
                }

    			case 1308:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_7, value);
    				#endif
                    break;
                }

    			case 1309:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_8, value);
    				#endif
                    break;
                }

    			case 1310:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    FuncInf_SetCmd(FUNCINF_OPERATOR_HMI, FUNCINF_CMD_IDX_9, value);
    				#endif
                    break;
                }

    			default:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }
    		}
    	}

        else if ((addr >= 3508) && (addr <= 3511))
        {
            switch(addr)
            {
                case 3508:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }

                case 3509:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }

                case 3510:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }


                case 3511:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }


                default :
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 0
                    #endif
                    break;
                }
            }
        }

        /* AC充放电量日期 */
        else if ((addr >= 3600) && (addr <= 3603))
        {
            peqdata = eqsQuttDataDBGet();
            switch(addr)
            {
                case 3600:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    #endif
                    break;
                }

                case 3601:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    peqdata->year = value;
                    #endif
                    break;
                }

                case 3602:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    peqdata->month = value;
                    #endif
                    break;
                }

                case 3603:
                {
                    printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                    #if 1
                    peqdata->day = value;
                    #endif
                    break;
                }
            }
        }

        /* 未定义 */
        else
        {
            printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
            #if 1
            #endif
        }
    }
    return retVal;
}
